package com.hgyc.mom.mes.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.annotation.DictColumn;
import com.hgyc.mom.core.annotation.TableDict;
import com.hgyc.mom.core.mybatis.EQ;
import com.hgyc.mom.core.mybatis.Like;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 工单工艺路线
 * </p>
 *
 * @author fwj
 * @since 2025-07-10
 */
@Data
@TableName("mes_work_order_process")
@Schema(name="工单工艺路线对象", description="工单工艺路线对象")
public class MesWorkOrderProcess implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "BOM行ID")
    private Long id;

    @Excel(name = "生产工单ID")
    @EQ
    @Schema(description = "生产工单ID")
    private Long workOrderId;

    @Excel(name = "工序ID")
    @EQ
    @Schema(description = "工序ID")
    @TableDict(table = "mes_process", key = "id" , columns = {
            @DictColumn(name ="process_code", alias = "processCode"),
            @DictColumn(name ="process_name", alias = "processName"),
    })
    private Long processId;

    @Excel(name = "序号")
    @Schema(description = "序号")
    private Integer orderNum;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @Excel(name = "工序状态")
    @Schema(description = "工序状态")
    private String status;

    @Excel(name = "实际开始时间")
    @Schema(description = "实际开始时间")
    private LocalDateTime startTime;

    @Excel(name = "实际结束时间")
    @Schema(description = "实际结束时间")
    private LocalDateTime endTime;

    @Excel(name = "进度百分比")
    @Schema(description = "进度百分比")
    private BigDecimal progress;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}